var a = getApp();

Page({
    data: {
        teamId: "",
        data: []
    },
    loadData: function() {
        var t = this;
        a.network.post({
            url: a.url.teamMemberList,
            params: {
                id: t.data.teamId
            },
            before: function() {
                wx.showNavigationBarLoading();
            },
            success: function(e) {
                1 == e.data.result ? (console.log("aaa" + e.data.data.members), t.setData({
                    data: e.data.data.members
                })) : a.util.showToast(e.data.message);
            },
            fail: function() {
                a.util.showToast("获取团队信息失败");
            },
            complete: function() {
                wx.hideNavigationBarLoading(), wx.stopPullDownRefresh();
            }
        });
    },
    clickMember: function(a) {
        var t = a.currentTarget.dataset.token;
        wx.navigateTo({
            url: "../teamMemberSchedule/teamMemberSchedule?token=" + t
        });
    },
    onLoad: function(a) {
        this.setData({
            teamId: a.teamId
        }), this.loadData();
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {}
});